<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>LS.Material</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
                <h1><img src="../assets/css/logo.png" title="" width="117" height="52"></h1>
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: </em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
                    <h2 class="off-left">APIs</h2>
                    <div id="api-tabview" class="tabview">
                        <ul class="tabs">
                            <li><a href="#api-classes">Classes</a></li>
                            <li><a href="#api-modules">Modules</a></li>
                        </ul>
                
                        <div id="api-tabview-filter">
                            <input type="search" id="api-filter" placeholder="Type to filter APIs">
                        </div>
                
                        <div id="api-tabview-panel">
                            <ul id="api-classes" class="apis classes">
                                <li><a href="../classes/LS.Animation.html">LS.Animation</a></li>
                                <li><a href="../classes/LS.Animation.Take.html">LS.Animation.Take</a></li>
                                <li><a href="../classes/LS.Animation.Track.html">LS.Animation.Track</a></li>
                                <li><a href="../classes/LS.BaseComponent.html">LS.BaseComponent</a></li>
                                <li><a href="../classes/LS.Collision.html">LS.Collision</a></li>
                                <li><a href="../classes/LS.ComponentContainer.html">LS.ComponentContainer</a></li>
                                <li><a href="../classes/LS.Components.Camera.html">LS.Components.Camera</a></li>
                                <li><a href="../classes/LS.Components.CameraController.html">LS.Components.CameraController</a></li>
                                <li><a href="../classes/LS.Components.CameraDirector.html">LS.Components.CameraDirector</a></li>
                                <li><a href="../classes/LS.Components.CameraFX.html">LS.Components.CameraFX</a></li>
                                <li><a href="../classes/LS.Components.Canvas3D.html">LS.Components.Canvas3D</a></li>
                                <li><a href="../classes/LS.Components.CustomData.html">LS.Components.CustomData</a></li>
                                <li><a href="../classes/LS.Components.FollowNode.html">LS.Components.FollowNode</a></li>
                                <li><a href="../classes/LS.Components.FrameFX.html">LS.Components.FrameFX</a></li>
                                <li><a href="../classes/LS.Components.FXGraphComponent.html">LS.Components.FXGraphComponent</a></li>
                                <li><a href="../classes/LS.Components.FXStack.html">LS.Components.FXStack</a></li>
                                <li><a href="../classes/LS.Components.GeometricPrimitive.html">LS.Components.GeometricPrimitive</a></li>
                                <li><a href="../classes/LS.Components.GraphComponent.html">LS.Components.GraphComponent</a></li>
                                <li><a href="../classes/LS.Components.Light.html">LS.Components.Light</a></li>
                                <li><a href="../classes/LS.Components.LightFX.html">LS.Components.LightFX</a></li>
                                <li><a href="../classes/LS.Components.LinesRenderer.html">LS.Components.LinesRenderer</a></li>
                                <li><a href="../classes/LS.Components.MeshRenderer.html">LS.Components.MeshRenderer</a></li>
                                <li><a href="../classes/LS.Components.NodeManipulator.html">LS.Components.NodeManipulator</a></li>
                                <li><a href="../classes/LS.Components.ParticlesEmissor.html">LS.Components.ParticlesEmissor</a></li>
                                <li><a href="../classes/LS.Components.PlayAnimation.html">LS.Components.PlayAnimation</a></li>
                                <li><a href="../classes/LS.Components.Poser.html">LS.Components.Poser</a></li>
                                <li><a href="../classes/LS.Components.RealtimeReflector.html">LS.Components.RealtimeReflector</a></li>
                                <li><a href="../classes/LS.Components.Rotator.html">LS.Components.Rotator</a></li>
                                <li><a href="../classes/LS.Components.SceneInclude.html">LS.Components.SceneInclude</a></li>
                                <li><a href="../classes/LS.Components.Script.html">LS.Components.Script</a></li>
                                <li><a href="../classes/LS.Components.SkinDeformer.html">LS.Components.SkinDeformer</a></li>
                                <li><a href="../classes/LS.Components.Skybox.html">LS.Components.Skybox</a></li>
                                <li><a href="../classes/LS.Components.Spline.html">LS.Components.Spline</a></li>
                                <li><a href="../classes/LS.Components.SVGRenderer.html">LS.Components.SVGRenderer</a></li>
                                <li><a href="../classes/LS.Components.Target.html">LS.Components.Target</a></li>
                                <li><a href="../classes/LS.Components.Transform.html">LS.Components.Transform</a></li>
                                <li><a href="../classes/LS.Components.VRCameraController.html">LS.Components.VRCameraController</a></li>
                                <li><a href="../classes/LS.CompositePattern.html">LS.CompositePattern</a></li>
                                <li><a href="../classes/LS.DebugRender.html">LS.DebugRender</a></li>
                                <li><a href="../classes/LS.Draw.html">LS.Draw</a></li>
                                <li><a href="../classes/LS.Formats.html">LS.Formats</a></li>
                                <li><a href="../classes/LS.GLSLCode.html">LS.GLSLCode</a></li>
                                <li><a href="../classes/LS.GraphCode.html">LS.GraphCode</a></li>
                                <li><a href="../classes/LS.GUI.html">LS.GUI</a></li>
                                <li><a href="../classes/LS.Input.html">LS.Input</a></li>
                                <li><a href="../classes/LS.InteractiveController.html">LS.InteractiveController</a></li>
                                <li><a href="../classes/LS.Knob.html">LS.Knob</a></li>
                                <li><a href="../classes/LS.LS.html">LS.LS</a></li>
                                <li><a href="../classes/LS.LScript.html">LS.LScript</a></li>
                                <li><a href="../classes/LS.Material.html">LS.Material</a></li>
                                <li><a href="../classes/LS.oldStandardMaterial.html">LS.oldStandardMaterial</a></li>
                                <li><a href="../classes/LS.Pack.html">LS.Pack</a></li>
                                <li><a href="../classes/LS.Particle.html">LS.Particle</a></li>
                                <li><a href="../classes/LS.Physics.html">LS.Physics</a></li>
                                <li><a href="../classes/LS.PhysicsInstance.html">LS.PhysicsInstance</a></li>
                                <li><a href="../classes/LS.Picking.html">LS.Picking</a></li>
                                <li><a href="../classes/LS.Player.html">LS.Player</a></li>
                                <li><a href="../classes/LS.Prefab.html">LS.Prefab</a></li>
                                <li><a href="../classes/LS.Project.html">LS.Project</a></li>
                                <li><a href="../classes/LS.Ray.html">LS.Ray</a></li>
                                <li><a href="../classes/LS.Renderer.html">LS.Renderer</a></li>
                                <li><a href="../classes/LS.RenderFrameContext.html">LS.RenderFrameContext</a></li>
                                <li><a href="../classes/LS.RenderInstance.html">LS.RenderInstance</a></li>
                                <li><a href="../classes/LS.RenderSettings.html">LS.RenderSettings</a></li>
                                <li><a href="../classes/LS.RenderState.html">LS.RenderState</a></li>
                                <li><a href="../classes/LS.Resource.html">LS.Resource</a></li>
                                <li><a href="../classes/LS.ResourcesManager.html">LS.ResourcesManager</a></li>
                                <li><a href="../classes/LS.Scene.html">LS.Scene</a></li>
                                <li><a href="../classes/LS.SceneNode.html">LS.SceneNode</a></li>
                                <li><a href="../classes/LS.ShaderBlock.html">LS.ShaderBlock</a></li>
                                <li><a href="../classes/LS.ShaderCode.html">LS.ShaderCode</a></li>
                                <li><a href="../classes/LS.ShaderGraph.html">LS.ShaderGraph</a></li>
                                <li><a href="../classes/LS.ShaderMaterial.html">LS.ShaderMaterial</a></li>
                                <li><a href="../classes/LS.Shaders.html">LS.Shaders</a></li>
                                <li><a href="../classes/LS.SpatialContainer.html">LS.SpatialContainer</a></li>
                                <li><a href="../classes/LS.StandardMaterial.html">LS.StandardMaterial</a></li>
                                <li><a href="../classes/LS.Tween.html">LS.Tween</a></li>
                                <li><a href="../classes/LS.UnityMaterial.html">LS.UnityMaterial</a></li>
                                <li><a href="../classes/LS.WBin.html">LS.WBin</a></li>
                                <li><a href="../classes/LSQ.html">LSQ</a></li>
                            </ul>
                
                
                            <ul id="api-modules" class="apis modules">
                                <li><a href="../modules/LS.html">LS</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
                    Show:
                    <label for="api-show-inherited">
                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited
                    </label>
            
                    <label for="api-show-protected">
                        <input type="checkbox" id="api-show-protected">
                        Protected
                    </label>
            
                    <label for="api-show-private">
                        <input type="checkbox" id="api-show-private">
                        Private
                    </label>
                    <label for="api-show-deprecated">
                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated
                    </label>
            
                </div>
            
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
<h1>LS.Material Class</h1>
<div class="box meta">


        <div class="foundat">
            Defined in: <a href="../files/.._src_materials_material.js.html#l4"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:4</code></a>
        </div>

            Module: <a href="../modules/LS.html">LS</a>

</div>


<div class="box intro">
    <p>A Material is a class in charge of defining how to render an object, there are several classes for Materials
but this class is more like a template for other material classes.
The rendering of a material is handled by the material itself, if not provided then uses the Renderer default one</p>

</div>

    <div class="constructor">
        <h2>Constructor</h2>
<div id="method_LS.Material" class="method item">
    <h3 class="name"><code>LS.Material</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>object</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l4"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:4</code></a>
        </p>



    </div>

    <div class="description">
        
    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">object</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>to configure from</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
    </div>

<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                            <li class="index-item method">
                                <a href="#method_clone">clone</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_configure">configure</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_createProperty">createProperty</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getProperties">getProperties</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getPropertiesInfo">getPropertiesInfo</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getProperty">getProperty</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getProperty">getProperty</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getProperty">getProperty</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getResources">getResources</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getResources">getResources</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getTexture">getTexture</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getTextureChannels">getTextureChannels</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getTextureSampler">getTextureSampler</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_loadAndSetTexture">loadAndSetTexture</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_loadTextures">loadTextures</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_onResourceRenamed">onResourceRenamed</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_onResourceRenamed">onResourceRenamed</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_registerMaterial">registerMaterial</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_serialize">serialize</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setProperty">setProperty</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setTexture">setTexture</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setTexture">setTexture</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setTextureInfo">setTextureInfo</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setTextureProperty">setTextureProperty</a>

                            </li>
                    </ul>
                </div>

                <div class="index-section properties">
                    <h3>Properties</h3>

                    <ul class="index-list properties">
                            <li class="index-item property">
                                <a href="#property_color">color</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_color">color</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_flags">flags</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_opacity">opacity</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_opacity">opacity</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_query">query</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_queue">queue</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_queue">queue</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_render_state">render_state</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_render_state">render_state</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_specular_gloss">specular_gloss</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_textures">textures</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_uvs_matrix">uvs_matrix</a>

                            </li>
                    </ul>
                </div>


        </div>

            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

<div id="method_clone" class="method item">
    <h3 class="name"><code>clone</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Material</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l281"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:281</code></a>
        </p>



    </div>

    <div class="description">
        <p>Clone this material (keeping the class)</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Material</span>:
                    <p>Material instance</p>

            </div>
        </div>


</div>
<div id="method_configure" class="method item">
    <h3 class="name"><code>configure</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>object</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l240"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:240</code></a>
        </p>



    </div>

    <div class="description">
        <p>Configure the material getting the info from the object</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">object</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>to configure from</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_createProperty" class="method item">
    <h3 class="name"><code>createProperty</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>value</code>
                </li>
                <li class="arg">
                        <code>type</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l738"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:738</code></a>
        </p>



    </div>

    <div class="description">
        <p>Creates a new property in this material class. Helps with some special cases
like when we have a Float32Array property and we dont want it to be replaced by another array, but setted</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>the property name as it should be accessed ( p.e.  &quot;color&quot; -&gt; material.color )</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">value</code>
                        <span class="type"></span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">type</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>a valid value type (&quot;Number&quot;,&quot;Boolean&quot;,&quot;Texture&quot;,...)</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_getProperties" class="method item">
    <h3 class="name"><code>getProperties</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_graphMaterial.js.html#l161"><code>..&#x2F;src&#x2F;materials&#x2F;graphMaterial.js:161</code></a>
        </p>



    </div>

    <div class="description">
        <p>gets all the properties and its types</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>object with name:type</p>

            </div>
        </div>


</div>
<div id="method_getPropertiesInfo" class="method item">
    <h3 class="name"><code>getPropertiesInfo</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l324"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:324</code></a>
        </p>



    </div>

    <div class="description">
        <p>gets all the properties and its types</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>object with name:type</p>

            </div>
        </div>


</div>
<div id="method_getProperty" class="method item">
    <h3 class="name"><code>getProperty</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l356"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:356</code></a>
        </p>



    </div>

    <div class="description">
        <p>gets all the properties and its types</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>object with name:type</p>

            </div>
        </div>


</div>
<div id="method_getProperty" class="method item">
    <h3 class="name"><code>getProperty</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_graphMaterial.js.html#l207"><code>..&#x2F;src&#x2F;materials&#x2F;graphMaterial.js:207</code></a>
        </p>



    </div>

    <div class="description">
        <p>gets all the properties and its types</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>object with name:type</p>

            </div>
        </div>


</div>
<div id="method_getProperty" class="method item">
    <h3 class="name"><code>getProperty</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l343"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:343</code></a>
        </p>



    </div>

    <div class="description">
        <p>gets all the properties and its types</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>object with name:type</p>

            </div>
        </div>


</div>
<div id="method_getResources" class="method item">
    <h3 class="name"><code>getResources</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>resources</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Texture</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_graphMaterial.js.html#l97"><code>..&#x2F;src&#x2F;materials&#x2F;graphMaterial.js:97</code></a>
        </p>



    </div>

    <div class="description">
        <p>Collects all the resources needed by this material (textures)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">resources</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>object where all the resources are stored</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Texture</span>:
            </div>
        </div>


</div>
<div id="method_getResources" class="method item">
    <h3 class="name"><code>getResources</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>resources</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Texture</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l621"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:621</code></a>
        </p>



    </div>

    <div class="description">
        <p>Collects all the resources needed by this material (textures)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">resources</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>object where all the resources are stored</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Texture</span>:
            </div>
        </div>


</div>
<div id="method_getTexture" class="method item">
    <h3 class="name"><code>getTexture</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>channel</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Texture</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l555"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:555</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the texture in a channel</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">channel</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>default is COLOR</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Texture</span>:
            </div>
        </div>


</div>
<div id="method_getTextureChannels" class="method item">
    <h3 class="name"><code>getTextureChannels</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Array</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l474"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:474</code></a>
        </p>



    </div>

    <div class="description">
        <p>gets all the texture channels supported by this material</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Array</span>:
                    <p>array with the name of every channel supported by this material</p>

            </div>
        </div>


</div>
<div id="method_getTextureSampler" class="method item">
    <h3 class="name"><code>getTextureSampler</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>channel</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Texture</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l581"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:581</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the texture sampler info of one texture channel (filter, wrap, uvs)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">channel</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>get available channels using getTextureChannels</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Texture</span>:
            </div>
        </div>


</div>
<div id="method_loadAndSetTexture" class="method item">
    <h3 class="name"><code>loadAndSetTexture</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>texture_or_filename</code>
                </li>
                <li class="arg">
                        <code>channel</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l294"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:294</code></a>
        </p>



    </div>

    <div class="description">
        <p>Loads and assigns a texture to a channel</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">texture_or_filename</code>
                        <span class="type">Texture |  | url</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">channel</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_loadTextures" class="method item">
    <h3 class="name"><code>loadTextures</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l663"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:663</code></a>
        </p>



    </div>

    <div class="description">
        <p>Loads all the textures inside this material, by sending the through the ResourcesManager</p>

    </div>




</div>
<div id="method_onResourceRenamed" class="method item">
    <h3 class="name"><code>onResourceRenamed</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>resources</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Texture</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_graphMaterial.js.html#l186"><code>..&#x2F;src&#x2F;materials&#x2F;graphMaterial.js:186</code></a>
        </p>



    </div>

    <div class="description">
        <p>Event used to inform if one resource has changed its name</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">resources</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>object where all the resources are stored</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Texture</span>:
            </div>
        </div>


</div>
<div id="method_onResourceRenamed" class="method item">
    <h3 class="name"><code>onResourceRenamed</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>resources</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Boolean</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l640"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:640</code></a>
        </p>



    </div>

    <div class="description">
        <p>Event used to inform if one resource has changed its name</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">resources</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>object where all the resources are stored</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Boolean</span>:
                    <p>true if something was modified</p>

            </div>
        </div>


</div>
<div id="method_registerMaterial" class="method item">
    <h3 class="name"><code>registerMaterial</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l675"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:675</code></a>
        </p>



    </div>

    <div class="description">
        <p>Register this material in a materials pool to be shared with other nodes</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>name given to this material, it must be unique</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_serialize" class="method item">
    <h3 class="name"><code>serialize</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l256"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:256</code></a>
        </p>



    </div>

    <div class="description">
        <p>Serialize this material</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>object with the serialization info</p>

            </div>
        </div>


</div>
<div id="method_setProperty" class="method item">
    <h3 class="name"><code>setProperty</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>object</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_graphMaterial.js.html#l230"><code>..&#x2F;src&#x2F;materials&#x2F;graphMaterial.js:230</code></a>
        </p>



    </div>

    <div class="description">
        <p>assign a value to a property in a safe way</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">object</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>to configure from</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setTexture" class="method item">
    <h3 class="name"><code>setTexture</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>texture</code>
                </li>
                <li class="arg">
                        <code>channel</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_graphMaterial.js.html#l269"><code>..&#x2F;src&#x2F;materials&#x2F;graphMaterial.js:269</code></a>
        </p>



    </div>

    <div class="description">
        <p>Assigns a texture to a channel</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">texture</code>
                        <span class="type">Texture</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">channel</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>default is COLOR</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setTexture" class="method item">
    <h3 class="name"><code>setTexture</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>channel</code>
                </li>
                <li class="arg">
                        <code>texture</code>
                </li>
                <li class="arg">
                        <code>sampler_options</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l485"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:485</code></a>
        </p>



    </div>

    <div class="description">
        <p>Assigns a texture to a channel and its sampling parameters</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">channel</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>for a list of supported channels by this material call getTextureChannels()</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">texture</code>
                        <span class="type">Texture</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">sampler_options</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setTextureInfo" class="method item">
    <h3 class="name"><code>setTextureInfo</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>channel</code>
                </li>
                <li class="arg">
                        <code>sampler</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l606"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:606</code></a>
        </p>



    </div>

    <div class="description">
        <p>Assigns a texture sampler to one texture channel (filter, wrap, uvs)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">channel</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>default is COLOR</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">sampler</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>{ texture, uvs, wrap, filter }</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setTextureProperty" class="method item">
    <h3 class="name"><code>setTextureProperty</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>channel</code>
                </li>
                <li class="arg">
                        <code>property</code>
                </li>
                <li class="arg">
                        <code>value</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l534"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:534</code></a>
        </p>



    </div>

    <div class="description">
        <p>Set a property of the sampling (wrap, uvs, filter)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">channel</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>for a list of supported channels by this material call getTextureChannels()</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">property</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>could be &quot;uvs&quot;, &quot;filter&quot;, &quot;wrap&quot;</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">value</code>
                        <span class="type"></span>


                    <div class="param-description">
                        <p>the value, for uvs check Material.TEXTURE_COORDINATES, filter is gl.NEAREST or gl.LINEAR and wrap gl.CLAMP_TO_EDGE, gl.MIRROR or gl.REPEAT</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
            </div>

            <div id="properties" class="api-class-tabpanel">
                <h2 class="off-left">Properties</h2>

<div id="property_color" class="property item">
    <h3 class="name"><code>color</code></h3>
    <span class="type">[r,g,b]</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l24"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:24</code></a>
        </p>


    </div>

    <div class="description">
        <p>materials have at least a basic color property and opacity</p>

    </div>

        <p><strong>Default:</strong> [1,1,1]</p>


</div>
<div id="property_color" class="property item">
    <h3 class="name"><code>color</code></h3>
    <span class="type">Vec3</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l152"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:152</code></a>
        </p>


    </div>

    <div class="description">
        <p>Surface color</p>

    </div>

        <p><strong>Default:</strong> [1,1,1]</p>


</div>
<div id="property_flags" class="property item">
    <h3 class="name"><code>flags</code></h3>
    <span class="type">Object</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l75"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:75</code></a>
        </p>


    </div>

    <div class="description">
        <p>flags to control cast_shadows, receive_shadows or ignore_frustum</p>

    </div>

        <p><strong>Default:</strong> { cast_shadows: true, receive_shadows: true, ignore_frutum: false }</p>


</div>
<div id="property_opacity" class="property item">
    <h3 class="name"><code>opacity</code></h3>
    <span class="type">Unknown</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l95"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:95</code></a>
        </p>


    </div>

    <div class="description">
        <p>The alpha component to control opacity</p>

    </div>

        <p><strong>Default:</strong> 1</p>


</div>
<div id="property_opacity" class="property item">
    <h3 class="name"><code>opacity</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l159"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:159</code></a>
        </p>


    </div>

    <div class="description">
        <p>Opacity. It must be &lt; 1 to enable alpha sorting. If it is &lt;= 0 wont be visible.</p>

    </div>

        <p><strong>Default:</strong> 1</p>


</div>
<div id="property_query" class="property item">
    <h3 class="name"><code>query</code></h3>
    <span class="type">LS.ShaderQuery</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l67"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:67</code></a>
        </p>


    </div>

    <div class="description">
        <p>used internally by LS.StandardMaterial
This will be gone in the future in order to use the new ShaderMaterial rendering system</p>

    </div>



</div>
<div id="property_queue" class="property item">
    <h3 class="name"><code>queue</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l32"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:32</code></a>
        </p>


    </div>

    <div class="description">
        <p>render queue: which order should this be rendered</p>

    </div>

        <p><strong>Default:</strong> LS.RenderQueue.DEFAULT</p>


</div>
<div id="property_queue" class="property item">
    <h3 class="name"><code>queue</code></h3>
    <span class="type">Unknown</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l106"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:106</code></a>
        </p>


    </div>

    <div class="description">
        <p>the render queue id where this instance belongs</p>

    </div>

        <p><strong>Default:</strong> LS.RenderQueue.DEFAULT;</p>


</div>
<div id="property_render_state" class="property item">
    <h3 class="name"><code>render_state</code></h3>
    <span class="type">Unknown</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l121"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:121</code></a>
        </p>


    </div>

    <div class="description">
        <p>the render state flags to control how the GPU behaves</p>

    </div>



</div>
<div id="property_render_state" class="property item">
    <h3 class="name"><code>render_state</code></h3>
    <span class="type"><a href="../classes/LS.RenderState.html" class="crosslink">LS.RenderState</a></span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l40"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:40</code></a>
        </p>


    </div>

    <div class="description">
        <p>render state: which flags should be used (in StandardMaterial this is overwritten due to the multipass lighting)
TODO: render states should be moved to render passes defined by the shadercode in the future to allow multipasses like cellshading outline render</p>

    </div>



</div>
<div id="property_specular_gloss" class="property item">
    <h3 class="name"><code>specular_gloss</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l168"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:168</code></a>
        </p>


    </div>

    <div class="description">
        <p>Specular glossiness: the glossines (exponent) of specular light</p>

    </div>

        <p><strong>Default:</strong> 10</p>


</div>
<div id="property_textures" class="property item">
    <h3 class="name"><code>textures</code></h3>
    <span class="type">Object</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l59"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:59</code></a>
        </p>


    </div>

    <div class="description">
        <p>texture channels
contains info about the samplers for every texture channel</p>

    </div>



</div>
<div id="property_uvs_matrix" class="property item">
    <h3 class="name"><code>uvs_matrix</code></h3>
    <span class="type">Mat3</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_materials_material.js.html#l51"><code>..&#x2F;src&#x2F;materials&#x2F;material.js:51</code></a>
        </p>


    </div>

    <div class="description">
        <p>matrix used to define texture tiling in the shader (passed as u_texture_matrix)</p>

    </div>

        <p><strong>Default:</strong> [1,0,0, 0,1,0, 0,0,1]</p>


</div>
            </div>


    </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
